home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-src / machines / ppc / machine.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  2KB  |  66 lines

  1. /*  Example of a code-generator for a PowerPC                       */
  2.  
  3. #include "dt.h"
  4.  
  5. /*  This struct can be used to implement machine-specific           */
  6. /*  addressing-modes.                                               */
  7. /*  Not used in this code-generrator.                               */
  8. struct AddressingMode{
  9.     int flags;
  10.     int base;
  11.     long offset;
  12. };
  13.  
  14. /*  The number of registers of the target machine.                  */
  15. #define MAXR 73
  16.  
  17. /*  Number of commandline-options the code-generator accepts.       */
  18. #define MAXGF 20
  19.  
  20. /*  If this is set to zero vbcc will not generate ICs where the     */
  21. /*  target operand is the same as the 2nd source operand.           */
  22. /*  This can sometimes simplify the code-generator, but usually     */
  23. /*  the code is better if the code-generator allows it.             */
  24. #define USEQ2ASZ 1
  25.  
  26. /*  This specifies the smallest integer type that can be added to a */
  27. /*  pointer.                                                        */
  28. #define MINADDI2P INT
  29.  
  30. /*  If the bytes of an integer are ordered most significant byte    */
  31. /*  byte first and then decreasing set BIGENDIAN to 1.              */
  32. #define BIGENDIAN 1
  33.  
  34. /*  If the bytes of an integer are ordered lest significant byte    */
  35. /*  byte first and then increasing set LITTLEENDIAN to 1.           */
  36. #define LITTLEENDIAN 0
  37.  
  38. /*  Note that BIGENDIAN and LITTLEENDIAN are mutually exclusive.    */
  39.  
  40. /*  If switch-statements should be generated as a sequence of       */
  41. /*  SUB,TST,BEQ ICs rather than COMPARE,BEQ ICs set this to 1.      */
  42. /*  This can yield better code on some machines.                    */
  43. #define SWITCHSUBS 0
  44.  
  45. /*  In optimizing compilation certain library memcpy/strcpy-calls   */
  46. /*  with length known at compile-time will be inlined using an      */
  47. /*  ASSIGN-IC if the size is less or equal to INLINEMEMCPY.         */
  48. /*  The type used for the ASSIGN-IC will be UNSIGNED|CHAR.          */
  49. #define INLINEMEMCPY 1024
  50.  
  51. /*  Parameters are sometimes passed in registers without __reg.     */
  52. #define HAVE_REGPARMS 1
  53.  
  54. /*  Parameters on the stack should be pushed in order rather than   */
  55. /*  in reverse order.                                               */
  56. #define ORDERED_PUSH 1
  57.  
  58. /*  Structure for reg_parm().                                       */
  59. struct reg_handle{
  60.     unsigned long gregs;
  61.     unsigned long fregs;
  62. };
  63.  
  64. /*  We have some target-specific variable attributes.               */
  65. #define HAVE_TARGET_ATTRIBUTES
  66.